@model string
@using NITASA.ViewModels
@{
    CL_WidgetOption wOption = NITASA.Helpers.Functions.ParseJson<CL_WidgetOption>(Model);
    List<CL_Category> Categories = NITASA.Helpers.Functions.GetCategories(wOption.Count);
}

@if (Categories.Count()>0)
{ 
    <h6 class="sidebartitle">@wOption.Title</h6>
    foreach (var item in Categories)
    {
        <a href="@(string.IsNullOrEmpty(item.URL) ? "#" : "/Category/" + item.URL)" class="tags">@item.Name</a>
    }
    <br class="clear" />
}